/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chapter3;

/**
 *
 * @author Denise Carolina
 */
public class WideningAndBoxing {

        static void go(Long x){
            System.out.println("Long");
        }

        static void go1(Object o){
            System.out.println("Object " + o);
            Byte b2 = (Byte)o;
            System.out.println("Byte:: " + b2);
        }

        static void wide_vararg(long ...l){
            System.out.println("long...");
        }

//        static void wide_vararg(Integer ...i){
//            System.out.println("Integer...");
//        }
//
//        static void wide_vararg(long l, long l1){
//            System.out.println("long, long");
//        }

//        static void wide_vararg(int x, int y){
//            System.out.println("int , int");
//        }

        static void box_vararg(Integer ... x){
            System.out.println("Integer...");
        }

        static void box_vararg(int x){
            System.out.println("int");
        }

//        static void box_vararg(int x, int y){
//            System.out.println("int , int");
//        }
        
//        static void box_vararg(long l, long l1){
//            System.out.println("long, long");
//        }
        public static void main(String[] args) {
            byte b = 5;
            //go(b);// illegal
            go1(b);

            int i = 5;
            box_vararg(i);
            box_vararg(i,i);
            wide_vararg(i,i);
        }

}
